package com.sdgakj.study.java20180822;

public class BinaryTree {

	private Node root;

	public void iterator(Integer nodeNumber) {
		if (root == null || nodeNumber == null || nodeNumber <= 0) {
			System.out.println("数为空！");
			return;
		}
	}

	public void setNode(Object data) {
		if (data == null) {
			System.out.println("数据不可为空！");
			return;
		}

		Node node = new Node(data);
		if (root == null) {
			root = node;
		} else {
			root.setNode(node);

		}

	}

	private class Node implements Comparable<Node> {

		private Object data;
		private Node left;
		private Node right;
		// private static Node parent;

		public Node(Object data) {
			this.data = data;
		}

		public Node getLeft() {
			return this.left;
		}

		public Node getRight() {
			return this.right;
		}

		// public Node getParent() {
		// return this.parent;
		// }

		public void setNode(Node node) {
			if (root.left != null) {
			}
		}

		@Override
		public int compareTo(Node o) {
			// TODO Auto-generated method stub
			return 0;
		}
	}
}
